package com.fuze.navi.domain.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author sepc_
 * @date 3/16/2021 13:50
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`user`")
public class User implements Serializable {
    private static final long serialVersionUID = 5785517075967862854L;
    /**
     * 自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户账号（使用手机号）
     */
    @TableField(value = "account")
    private String account;

    /**
     * 用户密码
     */
    @TableField(value = "pwd")
    private String pwd;

    /**
     * 用户密码加密的盐值
     */
    @TableField(value = "salt")
    private String salt;

    /**
     * 用户的逻辑删除（0-用户未删除，1-用户已经删除）
     */
    @TableField(value = "delete_flag")
    private Integer deleteFlag;

    /**
     * 用户的权限等级（0-普通用户，1-代表的是管理员用户）
     */
    @TableField(value = "authority")
    private Integer authority;

    public static final String COL_ID = "id";

    public static final String COL_ACCOUNT = "account";

    public static final String COL_PWD = "pwd";

    public static final String COL_SALT = "salt";

    public static final String COL_DELETE_FLAG = "delete_flag";

    public static final String COL_AUTHORITY = "authority";
}